{include file="header.html"}
<script type="text/javascript">
    $(function () {
        $('#login_form').validate({
            errorPlacement: function (error, element) {
                var error_td = element.parent('dd');
                error_td.find('label').hide();
                error_td.append(error);
            },
            success: function (label) {
                label.addClass('validate_right').text('OK!');
            },
            onkeyup: false,
            rules: {
                user_name: {
                    required: true
                },
                password: {
                    required: true
                },
                captcha: {
                    required: true,
                    remote: {
                        url: 'index.php?app=captcha&act=check_captcha',
                        type: 'get',
                        data: {
                            captcha: function () {
                                return $('#captcha1').val();
                            }
                        }
                    }
                }
            },
            messages: {
                user_name: {
                    required: '{$lang.user_name_required}'
                },
                password: {
                    required: '{$lang.password_required}'
                },
                captcha: {
                    required: '{$lang.captcha_required}',
                    remote: '{$lang.captcha_error}'
                }
            }
        });
    });
</script>
<style>
    #wxlogin_qr{float:right;}
    #wxlogin_qr img{width:50px;}
</style>
<div id="main" class="w-full">
<div area="login_left" widget_type="area" style="position:absolute;width:100%;">
<!--{widgets page=login area=login_left}-->
</div>
    <div id="page-login" class="login-register">
        <div class="w clearfix">

            <!--<p id="wxlogin_qr"></p>-->
            <div class="col-sub">
                <div class="form clearfix">
                    <div class="title">
                        <h2>{$lang.user_login}</h2>
                        <a href="{url app=member&act=register&ret_url=$ret_url}" title="{$lang.register}" class="fr">{$lang.new_user_register}</a>
                    </div>
                    <div class="content">
                        <form method="post" id="login_form">
                            <dl class="clearfix">
                                <!--lichen 2019/5/27 start-->
                                <!--<dt>{$lang.user_name}</dt>-->
                                <dt>{$lang.phone_mob}</dt>
                                <!--lichen 2019/5/27 end-->
                                <dd>
                                    <input class="input" type="text" name="user_name" placeholder="{$lang.phone_number}" />
                                    <div class="clr"></div><label></label>
                                </dd>
                            </dl>
                            <dl class="clearfix">
                                <dt>{$lang.password}</dt>
                                <dd>
                                    <input class="input" type="password" name="password" placeholder="{$lang.login_password}"/>
                                    <div class="clr"></div><label></label>
                                </dd>
                            </dl>

                            <!--{if $captcha}-->
                            <dl class="clearfix">
                                <dt>{$lang.captcha}</dt>
                                <dd class="captcha clearfix">
                                    <input type="text" class="input float-left" name="captcha" id="captcha1" />
                                    <img height="30" id="captcha" src="index.php?app=captcha&amp;{$random_number}" class="float-left" />
                                    <a href="javascript:change_captcha($('#captcha'));" class="float-left">{$lang.next_captcha}</a>
                                    <div class="clr"></div><label></label>
                                </dd>
                            </dl>
                            <!--{/if}-->
                            <dl class="clearfix">
                                <dt>&nbsp;</dt>
                                <dd class="clearfix">
                                    <input type="submit" class="login-submit" name="Submit" value="{$lang.login}" title="{$lang.login}" />
                                    <input type="hidden" name="ret_url" value="{$ret_url}" />
                                </dd>
                            </dl>
                            <dl class="clearfix">
                                <dt>&nbsp;</dt>
                                <dd class="clearfix">
                                    <a href="{url app=find_password}" class="find-password">{$lang.forget_password}</a>
                                </dd>
                            </dl>
                            <!--lichen 2019/5/27 start-->
                            <!--<div class="partner-login clearfix">-->
                                <!--<h3>{$lang.use_partner_account_login}</h3>-->
                                <!--<p>-->
                                    <!--<a class="login_ico ico_qq" href="{url app=third_login&act=qq}"></a>-->
                                    <!--<a class="login_ico ico_weibo" href="{url app=third_login&act=sina}"></a>-->
                                    <!--<a class="login_ico ico_weixin" href="https://open.weixin.qq.com/connect/qrconnect?appid={$wxlogin_qr.wxlogin_qr_appid}&redirect_uri={$wxlogin_qr.redirect_uri}&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect"></a>-->
                                <!--</p>-->
                            <!--</div>-->
                            <!--lichen 2019/5/27 end-->
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="footer.html"}
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
<script type="text/javascript">
    $(function() {
        var obj = new WxLogin({
            id: "wxlogin_qr",
            appid: "{$wxlogin_qr.wxlogin_qr_appid}",
            scope: "snsapi_login",
            redirect_uri: '{$wxlogin_qr.redirect_uri}',
            state: "",
            style: "",
            href: ""
        });
    });
</script>